﻿//-------------------------------------------------------------------
//	Copyright (c) 2010-2014  Zhirnov Andrey
//	This file is part of the "UX Standard Lib" project.
//	See copyright notice in "UX_Logger.h".
//-------------------------------------------------------------------

#ifndef _UX_OUTPUT_MESSAGES_H
#define _UX_OUTPUT_MESSAGES_H

#include "CLogger.h"

namespace UX_STL
{
namespace UXLogger
{
	
	//
	// Output Log Messages
	//

	class UX_EXPORT COutputMessages : public ILogOutput
	{
	private:
		e_log_msg::type		_eWarningLevel,
							_eFlagFilter;

	public:
		COutputMessages();
		~COutputMessages();

		void			SetFilter(e_log_msg::type eFilter)	{ _eFlagFilter = eFilter | e_log_msg::_LWL_MASK; }
		e_log_msg::type	GetFilter() const					{ return _eFlagFilter; }

		void			SetLevel(uint uLevel)				{ _eWarningLevel = (uLevel << e_log_msg::_LWL_OFFSET) & e_log_msg::_LWL_MASK; }
		e_log_msg::type	GetLevel()	const					{ return _eWarningLevel; }


		// ILogOutput //
		virtual void Write(const char *pMsg, e_log_msg::type eType, const char *pSrcFile, uint uLine);
		virtual void NewLine();
		virtual void Free();
		virtual e_log_output::bits	GetTypeBits() const		{ return e_log_output::MESSAGE_BIT; }
	};

//-------------------------------------------------------------------

}	// UXLogger
}	// UX_STL

#endif	// _UX_OUTPUT_MESSAGES_H